package com.itheima.project;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Description：ModelAndViewType返回
 */
@Controller
@RequestMapping("model-view-type")
public class ModelAndViewTypeController {

    @RequestMapping
    public ModelAndView defaultMethod(Model model){
        //内置对象传递参数
        model.addAttribute("content", "ModelAndViewType");
        //跳转页面
        return new ModelAndView("succeed");
    }
}
